﻿Imports QLTHUVIEN.DTO
Imports QLTHUVIEN.DAO
Public Class SachBUS
    Public Function layDanhSachSach() As DataTable
        Dim sachDao As New SachDAO()
        Dim dt As DataTable = sachDao.layDanhSachSach()
        Return dt
    End Function

    Public Sub themSach(ByVal sachDto As SachDTO)
        Dim sachDao As New SachDAO()
        sachDao.themSach(sachDto)
    End Sub

    Public Sub suaSach(ByVal sachDto As SachDTO)
        Dim sachDao As New SachDAO()
        sachDao.suaSach(sachDto)
    End Sub

    Public Sub xoaSach(ByVal sachDto As SachDTO)
        Dim sachDao As New SachDAO()
        sachDao.xoaSach(sachDto)
    End Sub

    Public Function TimKiemTheoMaSach(ByVal masach As Integer) As DataTable
        Dim dt As DataTable
        Dim sachdao As New SachDAO()
        dt = sachdao.TimKiemTheoMaSach(masach)
        Return dt
    End Function

    Public Function TimKiemTheoTenSach(ByVal tensach As String) As DataTable
        Dim dt As DataTable
        Dim sachdao As New SachDAO()
        dt = sachdao.TimKiemTheoTenSach(tensach)
        Return dt
    End Function

    Public Function TimKiemTheoNamXuatBan(ByVal namxuatban As Integer) As DataTable
        Dim dt As DataTable
        Dim sachdao As New SachDAO()
        dt = sachdao.TimKiemTheoNamXuatBan(namxuatban)
        Return dt
    End Function

    Public Function TimKiemTheoNhaXuatBan(ByVal nhaxuatban As String) As DataTable
        Dim dt As DataTable
        Dim sachdao As New SachDAO()
        dt = sachdao.TimKiemTheoNhaXuatBan(nhaxuatban)
        Return dt
    End Function

    Public Function TimKiemTheoTheLoai(ByVal theloai As String) As DataTable
        Dim dt As DataTable
        Dim sachdao As New SachDAO()
        dt = sachdao.TimKiemTheoTheLoai(theloai)
        Return dt
    End Function
End Class
